import React,{ Component } from "react";
import { View,Text,Button } from "react-native";

export default class page1 extends Component {
    static navigationOptions = ({ navigation })=>({
        title:navigation.state.params.name,
    });
    render(){
        const { navigation } = this.props;
        return (
            <View>
                <Text>我的page1</Text>
                <Button onPress={()=>{
                    navigation.goBack();
                }} title="GoBack"/>
                <Button onPress={()=>{
                    navigation.setParams({
                        theme:{
                            tintColor:'red',
                            updateTime:new Date().getTime(),
                        }
                    })
                }} title="改变颜色"/>
            </View>
        )
    }
}